<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>scale案例图片缩放</title>
    <style>
        div{
            width: 400px;
            height: 400px;
            float: left;
            margin: 10px;
            /* 将图片方法超出的 部分隐藏起来 */
            overflow: hidden;
        }
        div img{
            width: 100%;
            height: 100%;
            /* 谁过渡给谁加transition */
            transition: all .4s;
        }
        div img:hover{
            transform: scale(1.1);
        }
    </style>
</head>
<body>
    <div><img src="./banner3.jpg" alt=""></div>
    <div><img src="./banner3.jpg" alt=""></div>
    <div><img src="./banner3.jpg" alt=""></div>
   
</body>
</html>